<%--
    Document   : AdministradorConsultaCliente
    Created on : 9/10/2010, 09:03:55 PM
    Author     : MAN
<%= sesion.getAttribute("ident")%>
<%=sesion.getAttribute("Tipo")%>
--%>


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@page session="true" import="model.Empleado" errorPage="PaginaError.jsp"%>
<jsp:useBean id="model"	scope="session" class="model.WebModel"/>
<jsp:useBean id="em"	scope="page" class="model.Empleado"/>
<%
            Empleado e = null;
            HttpSession sesion = request.getSession();

            String consulta = (String) sesion.getAttribute("consulta");

            request = (HttpServletRequest) pageContext.getRequest();
            String BASEURL = request.getContextPath();
            String CONTROLLER = BASEURL + "/controller";
            em = (Empleado) sesion.getAttribute("empleado");
            session.setAttribute("consultaEmpleado", "1");




%>



<html>
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Confiteria Fuentes-Consulta Empleado</title>
        <script type='text/javascript' src='<%=BASEURL%>/SCRIPS/script.js'></script>

        <link rel='stylesheet' href='<%=BASEURL%>/CSS/style.css' type='text/css' media='screen' />

        <link rel="stylesheet" type="text/css" href="<%=BASEURL%>/CSS/view.css" media="all"/>

        <script type="text/javascript" src="<%=BASEURL%>/SCRIPS/view.js"></script>



        <script type="text/javascript">

            $(document).ready(function() {
                $("#form_1511").validate();

            });


            function limpiar(){

                document.getElementById("codi").value="";

                document.getElementById("nombree").value="";

                document.getElementById("salarioe").value="";


                document.getElementById("Tipoe").value="";
                



            }


        </script>


        <style type="text/css">
            #form_1511 { width: 500px; }
            #form_1511 label { width: 200px; }
            #form_1511 label.error, #form_1511 input.submit { margin-bottom:  5px; }
        </style>

    </head>

    <body>
     <body>
     <div id="art-page-background-gradient"></div>
    <div id="art-page-background-glare">
       <div id="art-page-background-glare-image"></div>
    </div>
    <div id="art-main">
        <div class="art-Sheet">
            <div class="art-Sheet-tl"></div>
            <div class="art-Sheet-tr"></div>
            <div class="art-Sheet-bl"></div>
            <div class="art-Sheet-br"></div>
            <div class="art-Sheet-tc"></div>
            <div class="art-Sheet-bc"></div>
            <div class="art-Sheet-cl"></div>
            <div class="art-Sheet-cr"></div>
            <div class="art-Sheet-cc"></div>
            <div class="art-Sheet-body">
                <div class="art-Header">
                    <div class="art-Header-png"></div>
                    <div class="art-Header-jpeg"></div>
                    <div class="art-Logo">
                        <h1 id="name-text" class="art-Logo-name"><a href="#">Confiteria Fuentes</a></h1>
                        <div id="slogan-text" class="art-Logo-text"></div>
                    </div>
                </div>
                <div class="art-nav">
                	<div class="l"></div>
                	<div class="r"></div>
                	<ul class="art-menu">

                            <li>
                			<a href="#" class=" active"><span class="l"></span><span class="r"></span><span class="t">Inicio</span></a>
                		</li>

                                             		<li>
                			<a href="#"><span class="l"></span><span class="r"></span><span class="t">Clientes</span></a>
                			<ul>
                                                <li><a href="<%=BASEURL%>/Rcliente.jsp">Registrar</a></li>
                				<li><a href="<%=BASEURL%>/AdministradorConsultaCliente.jsp">Consultar</a></li>
                				<li><a href="#">Actualizar</a></li>

                			</ul>
                		</li>
                               	<li>
                			<a href="#"><span class="l"></span><span class="r"></span><span class="t">Empleados</span></a>
                			<ul>
                                            <li><a href="<%=BASEURL%>/REmpleado.jsp">Registrar</a></li>
                                            <li><a href="<%=BASEURL%>/AdministradorConsultaEmpleado.jsp">Consultar</a></li>
                		            <li><a href="<%=BASEURL%>/REproducto.jsp">Actualizar</a></li>
                                            <li><a href="<%=BASEURL%>/REproducto.jsp">Registrar Camion</a></li>

                			</ul>
                		</li>
                		<li>
                			<a href="#"><span class="l"></span><span class="r"></span><span class="t">Productos</span></a>
                			<ul>
                				<li><a href="<%=BASEURL%>/REproducto.jsp">Registrar</a></li>
                				<li><a href="#">Consultar</a></li>
                				<li><a href="#">Actualizar</a></li>
                                                <li><a href="#">Eliminar</a></li>
                			</ul>
                		</li>
                                <li>
                			<a href="#"><span class="l"></span><span class="r"></span><span class="t">Pedidos</span></a>
                			<ul>
                				<li><a href="#">Realizar Pedido</a></li>
                				<li><a href="#">Consultar Pedido</a></li>
                				<li><a href="#">Actualizar Pedido</a></li>
                                                <li><a href="#">Eliminar</a></li>
                			</ul>
                		</li>
                                <li>
                			<a href="#"><span class="l"></span><span class="r"></span><span class="t">Envio</span></a>
                			<ul>
                				<li><a href="#">Realizar Envio</a></li>
                				<li><a href="#">Consultar Envio</a></li>
                			</ul>
                		</li>
                		<li>
                			<a href="#"><span class="l"></span><span class="r"></span><span class="t">Generar Reporte</span></a>

                		</li>

                	</ul>
                </div>

                    <div class="art-contentLayout">
                        <div class="art-content">
                            <div class="art-Post">
                                <div class="art-Post-body">
                                    <div class="art-Post-inner">
                                                                      <br>
                                        <div id="main_body" >

                                            <div id="form_container">

                                                <form id="form_1511" class="appnitro"  method="post" action="<%=CONTROLLER%>/Consulta/Cliente">
                                                    <div  class="form_description">
                                                        <h2 id="h11">Consultar Empleado</h2>
                                                        <p></p>
                                                    </div>
                                                    <ul >
                                                        <li id="li_1" >


                                                            <table>
                                                                <tr>
                                                                    <td>
                                                                        <label class="description" for="element_1">Codigo </label>
                                                                        <input    id="codi" name="codi" class=""   type="text" maxlength="15" value=""/>
                                                                    </td>

                                                                    <td  valign="bottom">
                                                                        <button   type="submit"  class="left"  ><img src="<%=BASEURL%>/imagenes/buscar1.png"/>Consultar</button>

                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </li>
                                                       <li id="li_10" >
                                                        </li>
                                                        <li id="li_2" >

                                                            <div  class="left">
                                                                <label class="description" for="element_2">Nombre </label>
                                                                <input disabled="disabled" id="nombree" name="nombree" class="element text medium" type="text" maxlength="255" value=""/>
                                                            </div>
                                                        </li>
                                                          <li id="li_3" >

                                                            <div  class="left">
                                                                <label class="description" for="element_3">Salario</label>
                                                                <input disabled="disabled" id="salarioe" name="salarioe" class="element text medium" type="text" maxlength="255" value=""/>
                                                            </div>
                                                        </li>
                                                       
                                                        <li id="li_4" >

                                                            <div class="left">
                                                                <label class="description" for="element_4">Tipo</label>
                                                                <input  disabled="disabled" id="tipoe" name="tipoe" class="element text medium" type="text"  value=""/>
                                                            </div>
                                                          </li>
                                                        <li class="buttons">
                                                            <input  type="hidden" name="form_id" value="1511" />

                                                            <table  cellspacing="5">
                                                                <tr>
                                                                    <td><button onclick="limpiar()"  type="button"><img alt="" src="<%=BASEURL%>/imagenes/clear.png"/>Limpiar</button></td>
                                                                </tr>

                                                            </table>
                                                        </li>
                                                    </ul>
                                                    <%sesion.setAttribute("empleao", e);%>
                                                </form>
                                                <div class="cleared"></div>
                                               <div class="cleared"></div>
                                            </div>
                                        </div>
                                    </div>
                                    <script type="text/javascript" language="javascript">

                                        <%

                                                String id1 = (String) sesion.getAttribute("ident");
                                                if (consulta.equals("false") && id1 != null) {
                                        %>


                                        alert("Empleado no se encuentra registrado");

                                        <%sesion.setAttribute("consulta", "nn");
                                                }%>


                                    </script>
                                    <script type="text/javascript">
                                        <%
                                                    if (em != null) {
                                        %>

                                            document.getElementById("codi").value="<%=em.getCodigo()%>";

                                            document.getElementById("nombree").value="<%=em.getNombre()%>";

                                            document.getElementById("salarioe").value="<%=em.getSalario()%>";


                                            document.getElementById("tipoe").value="<%=em.getTipoempleado()%>";
                                          


                                        <%}%>

                                    </script>
                                    <div class="art-Post">
                                        <div class="art-Post-body">
                                            <div class="cleared"></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="cleared"></div>

                            <div class="cleared"></div>
                        </div>
                    </div>
                   <div class="cleared"></div>
                </div>
            </div>
        </div>

    </body>
</html>
